<template>
	<el-container>
		<el-main>
			<el-form  ref="item" :model="item" label-width="150px" >
				 
			    <el-form-item label="openid"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.openid"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  
			    <el-form-item label="昵称"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.nickname"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  
			    <el-form-item label="性别"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.sex"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  
			    <el-form-item label="年龄"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.age"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  
			    <el-form-item label="城市id"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.cityId"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  
			    <el-form-item label="城市名称"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.cityName"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  
			    <el-form-item label="电话"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.mobile"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  
			    <el-form-item label="头像"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.avatar"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  
			    <el-form-item label="密码"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.password"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  
			    <el-form-item label="推荐人电话"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.refereeMobile"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  
			    <el-form-item label="推荐人id"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.refereeId"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  
			    <el-form-item label="推荐奖金"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.refereeMoney"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  
			    <el-form-item label="推荐时间"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.refereeTime"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  
			    <el-form-item label="手机类型"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.mobileType"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  
			    <el-form-item label="金额"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.money"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
    
			    <el-form-item label="支付密码"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.payPassword"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  
			    <el-form-item label="是否停用"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.isShow"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  
			    <el-form-item label="注册时间"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.subscribeTime"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  
			    <el-form-item label="城市"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.city"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  
			    <el-form-item label="省级"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.province"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  
			    <el-form-item label="区县"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.country"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  
			    <el-form-item label="真实姓名"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.realName"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  
			    <el-form-item label="身份证号"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.idCard"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  
			    <el-form-item label="联系方式"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.contactMobile"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  
			    <el-form-item label="是否为核销人员"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.isAdmin"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  
			    <el-form-item label="积分"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.integral"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  
			    <el-form-item label="小区id"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.communityId"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  
			    <el-form-item label="小区名称"   style="padding-top: 20px;">
                    <el-col :span="10">
					    <el-input v-model="item.communityName"></el-input>
                    </el-col>
				</el-form-item>
				<div style="border-bottom: 1px solid #f3f3f3; height: 1px; width: 100%">&nbsp;</div>
  				<el-form-item>
					<el-button type="primary" @click="onSubmit">保存</el-button>
					
				</el-form-item>
			</el-form>
		</el-main>
	</el-container>
</template>

<script>
	import {post} from "@/api/user";
	export default {
		name: "shequMemberedit",
		data(){
			return {
				item:{
				},
				id:-1,
			}
		},
		methods:{
			getItemById(){
				let _this = this
				post('/member/shequMember/getById',{
					id:_this.id
				}).then(res =>{
					_this.item =  res.i
				}).catch(err =>{

				})
			},
			onSubmit(){
				this.save()
			},
			save(){
				let _this = this
				post('/member/shequMember/save',_this.item).then(res =>{
					_this.$router.push({path:'/shequMember/list'})
				}).catch(err =>{

				})
			}
		},
		created(){
			this.id =   this.$route.query.id
			this.getItemById()
		}
	}
</script>

<style scoped>
    .el-form-item{
        width: 80%;
    }
</style>
